package iyoga;

import java.io.*;

public class Iyoga {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new 
                InputStreamReader(System.in));
		String str;
		do {
	         str = br.readLine();
//			str="i add-member a s d";
	         String[] strArray=str.split(" ");
	         if(strArray[1].equals("add-member")){
	         User.add_member(strArray[2],strArray[3],strArray[4]);
	         }
	         if(strArray[1].equals("add-card")){
	        	 int str4=Integer.parseInt(strArray[4]);
	        	 if(strArray[3].equals("次卡")){
	        		 Card.add_card(strArray[2],"次卡",str4);
	        	 }else if(strArray[3].equals("年卡")){
			         Card.add_card(strArray[2],"年卡",-1);
		        	 }else {
		        		 System.out.println("请输入正确的卡类型！！！");
		        	 }
		         }
	      } while(!str.equals("end"));
	   
	}	
	
}
